<template>
    <div>
        <!-- 底部导航 -->
        <van-tabbar v-model="active" :route="true" @change="changeFn">
            <van-tabbar-item to="/home" icon="home-o">首页</van-tabbar-item>
            <van-tabbar-item to="/topic" icon="label-o">专题</van-tabbar-item>
            <van-tabbar-item to="/category" icon="search">分类</van-tabbar-item>
            <van-tabbar-item to="/car" icon="friends-o">购物车</van-tabbar-item>
            <van-tabbar-item to="/user" icon="setting-o">我的</van-tabbar-item>
        </van-tabbar>
    </div>
</template>

<script>
export default {
    name: "",
    props: [""],
    data(){
        return{
            active:0
        }
    },
    methods: {
        changeFn(active) {
        // console.log(active);
        this.active = active
        },
    },
};
</script>
<style scoped>
</style>
